Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@dnd-kit/utilities
Advanced tools
The @dnd-kit/utilities package provides a set of utility functions and types that are designed to be used with the @dnd-kit/core package for building drag and drop interfaces. These utilities help with common tasks such as managing keyboard events, coordinates, and other drag and drop related calculations.
Coordinates
Utilities for managing coordinates, such as calculating relative positions for drag and drop elements.
{"getRelativeTransform": (x, y) => `translate3d(${x}px, ${y}px, 0)`}
Keyboard Coordinates
Functions to handle keyboard events and convert them into coordinates for keyboard accessible drag and drop functionality.
{"keyboardCoordinates": (event) => ({x: event.clientX, y: event.clientY})}
Distance Measurement
Functions to measure the distance between two points, useful for determining drag thresholds and more.
{"distance": (x1, y1, x2, y2) => Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2))}
React DnD is a set of React utilities to help you build complex drag and drop interfaces while keeping your components decoupled. It provides more comprehensive drag and drop context and handlers compared to @dnd-kit/utilities, which is more focused on utility functions.
A higher-level abstraction specifically built for vertical and horizontal lists. Unlike @dnd-kit/utilities, which provides low-level utilities, react-beautiful-dnd offers a more opinionated solution with a focus on list reordering.
SortableJS is a minimalist JavaScript library for reorderable drag-and-drop lists on modern browsers and touch devices. It does not require a framework and has more out-of-the-box functionality for list reordering compared to the utility-centric approach of @dnd-kit/utilities.
FAQs
Internal utilities to bee shared between `@dnd-kit` packages
The npm package @dnd-kit/utilities receives a total of 864,885 weekly downloads. As such, @dnd-kit/utilities popularity was classified as popular.
We found that @dnd-kit/utilities demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.